/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.component.mail.repository.mapper;

import info.peigen.hotpot.component.data.repository.beetlsql.mapper.AbstractBeetlSqlMapper;
import info.peigen.hotpot.component.mail.repository.entity.MailTemplateEntity;
import org.beetl.sql.mapper.annotation.Select;
import org.beetl.sql.mapper.annotation.Sql;
import org.beetl.sql.mapper.annotation.Update;

/**
 * <b>(MailTemplateMapper)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/8/12
 */
@SuppressWarnings("AlibabaAbstractMethodOrInterfaceMethodMustUseJavadoc")
public interface MailTemplateMapper extends AbstractBeetlSqlMapper<MailTemplateEntity> {
    @Sql("select * from mail_template where template_id = ?")
    @Select
    MailTemplateEntity findByTemplateId(String templateId);

    @Sql("delete from mail_template where template_id = ?")
    @Update
    void deleteByTemplateId(String templateId);
}